from create import creat_flask
from flask import Flask,make_response,request,session

app = creat_flask()
app.secret_key = '2206'

@app.route('/set')
def set_ck(a,/,*,b):
    resp = make_response('自定义字符串')
    resp.set_cookie('ok','resadwafewfwf',max_age=60)
    return resp

@app.route('/get')
def get_cookie()->str:
    print(request.cookies.get('ck'))
    return 'dsafas'

@app.route('/set_se')
def set_se():
    session['my_session'] = 'safafdsafdwafdsa'
    return 'dsafdsaf'

@app.route('/get_se')
def get_se():
    return session['my_session']

if __name__ == '__main__':
    app.run(host='0.0.0.0',port=9527)